from django.contrib import admin
from django.urls import path,include
import myApp.views
from myApp import views, user_views
from myApp import hive_views
urlpatterns = [
    path("index/",views.index,name='index'),
    path("chartOne/", views.chartOne, name='chartOne'),
    path("rateChart/", views.rateChart, name='rateChart'),
    path("timeChart/", views.timeChart, name='timeChart'),
    path("boxChart/", views.boxChart, name='boxChart'),
    path("tableData/", views.tableData, name='tableData'),
    path("changeInfo/", views.changeInfo, name='changeInfo'),
    path("collectData/", views.collectData, name='collectData'),
    path("predict/", views.predict, name='predict'),
    path("recommendation/", views.recommendation, name='recommendation'),
    path("movieCloud/", views.movieCloud, name='movieCloud'),
    path("actorCloud/", views.actorCloud, name='actorCloud'),
    path("login/", views.login, name='login'),
    path("logOut/", views.logOut, name='logOut'),
    path("register/", views.register, name='register'),
    path("addHistory/<int:movieId>", views.addHistory, name='addHistory'),
    path("delHisotry/<int:movieId>", views.delHisotry, name='delHisotry'),

    path('list_tables/', hive_views.list_tables, name='list_tables'),
    path('table/<str:table_name>/', hive_views.table_detail, name='table_detail'),
    path('table/<str:table_name>/add/', hive_views.add_record, name='add_record'),
    path('table/<str:table_name>/edit/<str:record_id>/', hive_views.edit_record, name='edit_record'),
    path('table/<str:table_name>/delete/<str:record_id>/', hive_views.delete_record, name='delete_record'),


    # 用户管理
    path('users/', user_views.user_list, name='user_list'),
    path('users/add/', user_views.user_add, name='user_add'),
    path('users/edit/<int:pk>/', user_views.user_edit, name='user_edit'),
    path('users/delete/<int:pk>/', user_views.user_delete, name='user_delete'),
]